package com.action
{
	import com.resource.unit.ActionUnit;
	import com.stage.item.Player;
	
	public class ActionDefence extends BaseAction
	{
		private var _moveDir:int = 0;
		
		public function ActionDefence(player:Player)
		{
			super(player);
			_type = DEFENCE;
		}
		
		public override function start(dir:int=1, moveDir:int=0):void{
			_player.act = ActionUnit.DEFENCE;
			super.start(dir);
			if(moveDir == 0){
				_moveDir = _player.dir;
			}else{
				_moveDir = moveDir;
			}
		}
		
		protected override function enterFrame():void{
			checkGround();
			_player.x += _speed;
		}
		
		protected override function onLandGround():void{
//			if(_actFinish){
//				_player.action = new ActionStand(player);
//				_player.action.start(_player.dir);
//			}
		}
	}
}